'use strict'

define([ 'jquery', 'bootstrap', 'select2', 'validate',
        'validate.en', 'datetimepicker', 'datetimepickerCN' ], function($) {
    return {
        init : function() {
            this.initUpload();
        },
        initUpload: function() {
            
            $(document).on('shown.bs.modal', '#upload', function(e) {
              
              $(e.currentTarget).find('form[data-validate="true"]').bt_validate()  //bind validate
              
              document.getElementById("cover").onchange = function () {
                document.getElementById("coverFile").value = this.value;
              }
              
            })
            
          }
    }
});

function doChange(value,ctx){
	if(value!=null && value !=""){
		window.location.href=ctx+"/dynamic-report?reportId="+value;
	}
}
